
<extend name='Common/common' />

<block name='content'>
<style>
body{
	background: #f7f7f7;
}
</style>
<link rel="stylesheet" href="__PUBLIC_ADMIN__lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">

<table class="table">
	<tr>
		<td width="160" class="va-t"><ul id="treeDemo" class="ztree"></ul></td>
		<td class="va-t"><iframe ID="testIframe" Name="testIframe" FRAMEBORDER=0 SCROLLING=AUTO width=100%  height=550px SRC="{:U('NewBlog/blogList')}"></iframe></td>
	</tr>
</table>
<style>
.ztree li span.button{
	min-width: 0px;
}
</style>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__PUBLIC_ADMIN__lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript">
var setting = {
	view: {
		dblClickExpand: false,
		showLine: false,
		selectedMulti: false
	},
	data: {
		simpleData: {
			enable:true,
			idKey: "id",
			pIdKey: "pId",
			rootPId: ""
		}
	},
	callback: {
		beforeClick: function(treeId, treeNode) {
			var zTree = $.fn.zTree.getZTreeObj("tree");
			if (treeNode.isParent) {
				//demoIframe.attr("src",treeNode.src);
				return false;
			} else {
				demoIframe.attr("src",treeNode.src);
				return true;
			}
		}
	}
};

var zNodes =[{$cat_str}];
		
var code;
		
function showCode(str) {
	if (!code) code = $("#code");
	code.empty();
	code.append("<li>"+str+"</li>");
}
		
$(document).ready(function(){
	var t = $("#treeDemo");
	t = $.fn.zTree.init(t, setting, zNodes);
	demoIframe = $("#testIframe");
	//demoIframe.on("load", loadReady);
	var zTree = $.fn.zTree.getZTreeObj("tree");
	//zTree.selectNode(zTree.getNodeByParam("id",'11'));
});
</script>
</block>